const express = require('express')
const router = express.Router()
const questionController = require('@/controllers/question.controller')

/**
 * 查询题目分类列表
 * @route GET /question/category
 * @group 刷题管理
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 */
router.get('/category', questionController.getQuestionClassify)

/**
 * 查询题目分页列表
 * @route GET /question
 * @group 刷题管理
 * @param {string} tagId.query.required
 * @param {integer} page.query.required
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 */
router.get('/', questionController.getQuestionPageList)

/**
 * 查询题目详情
 * @route GET /question/detail
 * @group 刷题管理
 * @param {string} id.query.required
 * @param {string} tagId.query.required
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 */
router.get('/detail', questionController.getQuestionDetail)

module.exports = router
